{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "import importlib\n",
    "from cion import *\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "#execfile('ZTESTER_Load_ion.py')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Basic test"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "Global_Setting.set_debug_mode(False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Warning! You did not specify the chapter data for this experiments, the FPGA utility will be deactivated.\n",
      "Python Version: 3.9.7 on Windows\n",
      "\n",
      "Found: M4i.6622-x8 sn 17629\n"
     ]
    }
   ],
   "source": [
    "exp = Experiment(ion_number = 1, ip_address='192.168.2.30::INSTR1::INSTR')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1 channels are enabled.\n"
     ]
    }
   ],
   "source": [
    "exp.awg_interface.enable_channels([1],soft_flag=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x14ed6b520d0>]"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAD4CAYAAADhNOGaAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAA0YklEQVR4nO2dd5gURfrHv+8uLEHJICJZBQUDKAuiqARXRTnBM3unoqfHnR4/z3ze4XkeJszhxIAI5ogJFUVAosQ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5g4nOIKIcAEMA9GfmQwlKm1c46VwHwMkAphDROgR8qWPTfMDYJJ83AhjLzIeZeS2A1QgYhnTFROebAXwMAMw8C0BNBBZnq6oYve+mVFVDMA9AOyJqS0RZCAwGjw2RGQtgoPX5CgA/sDUKk6Y46kxEpwF4DQEjkO5+Y8BBZ2YuYubGzNyGmdsgMC7Sn5lzk5NcVzAp218g0BsAETVGwFWUn8A0uo2JzusBnAcARNQBAUNQmNBUJpaxAG6wooe6Ayhi5s2xXqxKuoaYuZSIBgMYj0DEwShmXk5EQwHkMvNYAG8g0H3MQ2BQ5prkpTh+DHV+CsCRAD6xxsXXM3P/pCU6Tgx1rlIY6jwewAVEtAJAGYB7mTlte7uGOt8N4HUiuhOBgeMb07lhR0QfIGDMG1vjHv8BUB0AmPlVBMZBLgaQB+AAgJviul8aPytFURTFBaqqa0hRFEUxRA2BoiiKz1FDoCiK4nPUECiKovgcNQSKoig+Rw2BoiiKz1FDoCiK4nP+Hzj9cTC54jOwAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# tlist = np.arange(0,150/0.0016)/1000\n",
    "# b = [0.3*np.sin(-t/20)*np.sin(20*np.pi*t) for t in tlist]\n",
    "tlist  = np.arange(0,1,1/625)\n",
    "tlist2 = 1\n",
    "b = 0.9*np.sin(2*np.pi*tlist*200)\n",
    "\n",
    "size =500\n",
    "plt.plot(tlist, b)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Starting the DMA transfer and waiting until data is in board memory\n",
      "... data has been transferred to board memory\n",
      "\n",
      "Starting the card and waiting for ready interrupt\n",
      "(continuous and single restart will have timeout)\n"
     ]
    }
   ],
   "source": [
    "exp.awg_interface.send_data(b,loop=1) "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "close\n"
     ]
    }
   ],
   "source": [
    "exp.awg_interface.close()\n",
    "print('close')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Test Experiment"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
